This lets you fetch a file using its whole pathname, and
write a copy of it in the current directory, without having
to bother with typing a local filename. In the unlikely
event that you have write permission to a directory called
////ppppuuuubbbb on your local machine, it would write ``RRRREEEEAAAADDDDMMMMEEEE'' in
that directory.
Most of the time the file you want will be in the current
remote directory, so you can just do these:
get README
get README ./junk/readme
You can also use a redirection for _g_e_t, just like you can
with the _l_s, _d_i_r, and _r_e_d_i_r commands. As described earlier,
you have to conform to the format below for this release of
the program:
get README >/dev/null
get README |head
get README "|head -8"
get README "|less -EMi"
The last example is facilitated by the _p_a_g_e command
described later.
The _g_e_t command can also use a wildcard expression in an
attempt to match exactly one remote file. I call it ``Poor
Man's File Completion.'' If you've done a remote listing,
and you decide you want to download a file by the name of
``oooobbbbnnnnooooxxxxiiiioooouuuussssllllyyyylllloooonnnnggggppppaaaacccckkkkaaaaggggeeeennnnaaaammmmeeee....ttttaaaarrrr....ZZZZ'', you can use ``PMFC''
to save some keystrokes. Choose an expression that will
only match that one file, then use it with _g_e_t:
get obn*.Z a.tar.Z
If your pattern was unique, _g_e_t will fetch that file only.
If the pattern matched more than one file, the program will
bitch and moan.
The _m_g_e_t command is used to fetch many files at a time. The
difference between _g_e_t and _m_g_e_t is that _g_e_t lets you write
only one file, but you can put it in a different directory,
while _m_g_e_t fetches many files, always writing them in the
current local directory. This example fetches several
remote files at once:
mget a.file.Z b.file.Z c.tar d.tar.Z
The _m_g_e_t command, and its ugly sisters, _m_p_u_t and _m_d_e_l_e_t_e let